Skip to content

[Feature/#332] 내 알림 설정 GET API 연동 - #334

Merged
jjjsun merged 3 commits into
developfrom
feature/#332
Jul 28, 2026
Merged

jjjsun merged 3 commits into
developfrom
feature/#332

Conversation

@jjjsun

@jjjsun jjjsun commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

🚨 관련 이슈

Closed #332

✨ 변경사항

  • 🐞 BugFix Something isn't working
  • 💻 CrossBrowsing Browser compatibility
  • 🌏 Deploy Deploy
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related (storybook, jest, etc.)

✏️ 작업 내용

  • GET /api/notification/settings/{orgId} 연동
  • useMyNotificationSettings 훅/queryKey 추가
  • Setting 알림 토글 초기값을 서버 설정으로 반영
  • 로딩 스켈레톤/에러 toast 처리

😅 미완성 작업

  • 멤버 목록 알림 조회 API 연동 및 UI 구현 (후속 이슈 예정)

📢 논의 사항 및 참고 사항

  • 워크스페이스 미선택시에는 요청하지 않도록 하였습니다.

💬 리뷰어 가이드 (P-Rules)
P1: 필수 반영 (Critical) - 버그 가능성, 컨벤션 위반. 해결 전 머지 불가.
P2: 적극 권장 (Recommended) - 더 나은 대안 제시. 가급적 반영 권장.
P3: 제안 (Suggestion) - 아이디어 공유. 반영 여부는 드라이버 자율.
P4: 단순 확인/칭찬 (Nit) - 사소한 오타, 칭찬 등 피드백.

Summary by CodeRabbit

  • 새 기능

    • 선택한 워크스페이스의 내 알림 설정을 조회하고 화면에 반영합니다.
    • 알림 설정 저장 상태와 변경 여부를 안정적으로 관리합니다.
  • 버그 수정

    • 알림 설정을 불러오는 동안 로딩 상태와 저장 버튼 비활성화를 표시합니다.
    • 조회 오류 발생 시 안내 메시지와 “다시 시도” 버튼을 제공합니다.
    • 설정 조회에 실패한 경우 잘못된 알림 설정 저장을 방지합니다.

@jjjsun
jjjsun requested review from Seojegyeong and YermIm July 28, 2026 06:08
@jjjsun jjjsun self-assigned this Jul 28, 2026
@jjjsun jjjsun added ✨ Feature 기능 개발 📬 API 서버 API 통신 labels Jul 28, 2026
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jjjsun, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: cc408590-92de-4f07-94dd-b0f7937ba510

📥 Commits

Reviewing files that changed from the base of the PR and between 7e6faf1 and 4bfea69.

📒 Files selected for processing (1)
  • src/pages/setting/Setting.tsx
📝 Walkthrough

Walkthrough

조직별 알림 설정 조회 API와 React Query 훅을 추가하고, Setting 화면에서 조회된 값을 초기 상태에 반영합니다. 로딩·오류·재시도 상태와 알림 설정 저장 제어도 함께 연결했습니다.

Changes

알림 설정 조회 연동

Layer / File(s) Summary
알림 설정 조회 경로
src/api/notification/notification.ts, src/lib/queryKeys.ts, src/hooks/setting/useMyNotificationSettings.ts
조직 ID로 알림 설정 API를 호출하고, 조직별 쿼리 키와 조건부 조회 훅을 추가합니다.
Setting 상태 동기화
src/pages/setting/Setting.tsx
조회된 알림 설정을 채널·워크스페이스 드래프트 및 저장 상태에 매핑하고, 조직 미선택 시 기본값으로 초기화합니다.
로딩·오류·저장 제어
src/pages/setting/Setting.tsx
알림 조회 로딩 중 스켈레톤과 저장 비활성화를 적용하고, 오류 시 저장을 차단하며 오류 메시지와 재시도 버튼을 표시합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Setting
  participant useMyNotificationSettings
  participant NotificationAPI
  User->>Setting: 조직 선택
  Setting->>useMyNotificationSettings: selectedOrgId 전달
  useMyNotificationSettings->>NotificationAPI: getMyNotificationSettings(orgId)
  NotificationAPI-->>useMyNotificationSettings: 알림 설정 또는 오류 반환
  useMyNotificationSettings-->>Setting: 데이터·로딩·오류 상태 반환
  Setting-->>User: 설정 토글 또는 재시도 UI 표시
Loading

Possibly related issues

Possibly related PRs

Suggested reviewers: yermim, seojegyeong

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 내 알림 설정 GET API 연동이라는 핵심 변경을 짧고 명확하게 담고 있습니다.
Description check ✅ Passed 이슈, 변경사항, 작업 내용, 미완성 작업, 참고 사항이 모두 포함되어 템플릿 요구사항을 대부분 충족합니다.
Linked Issues check ✅ Passed #332의 API 추가, queryKey/hook, Setting 초기값 연동, 로딩·에러 처리가 모두 반영되어 있습니다.
Out of Scope Changes check ✅ Passed 변경 범위가 알림 설정 조회와 Setting 연동에 집중되어 있어, 링크된 이슈 밖의 작업은 보이지 않습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/#332

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

📚 Storybook 배포 완료

항목 링크
📖 Storybook https://69a147b60a56365d9e2185ef-tnfqmndqha.chromatic.com/
🔍 Chromatic https://www.chromatic.com/build?appId=69a147b60a56365d9e2185ef&number=462

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/hooks/setting/useMyNotificationSettings.ts (1)

1-1: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

useCoreQuery import를 별칭 경로로 통일해주세요.

Line 1의 상대 경로는 프로젝트 import 규칙과 다릅니다.

수정 예시
-import { useCoreQuery } from "../customQuery";
+import { useCoreQuery } from "`@/hooks/customQuery`";

As per coding guidelines, use @/ alias for all imports.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/hooks/setting/useMyNotificationSettings.ts` at line 1, Update the
useCoreQuery import in useMyNotificationSettings.ts to use the project’s `@/`
alias path instead of the relative ../customQuery path, preserving the same
imported symbol.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/setting/Setting.tsx`:
- Around line 266-271: Update the Setting component’s notificationSettings
handling so DEFAULT_CHANNEL and DEFAULT_WORKSPACE_NOTIF are applied only when no
workspace is selected, not when settings loading fails. Preserve the error state
instead of rendering editable defaults: disable the notification section and
save action, display an error message, and provide the existing settings
refetch/retry behavior.
- Around line 274-281: Update the nextWorkspace mapping in Setting.tsx to use
the organization-scoped response fields for the workspace notification toggles
instead of the personal notificationSettings.alertClicks and alertReport values.
Keep nextChannel mapped to the personal browser and email settings, and ensure
draftWorkspaceNotif receives the organization values for clickAlarm and
weeklyReport.

---

Nitpick comments:
In `@src/hooks/setting/useMyNotificationSettings.ts`:
- Line 1: Update the useCoreQuery import in useMyNotificationSettings.ts to use
the project’s `@/` alias path instead of the relative ../customQuery path,
preserving the same imported symbol.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b769c24a-97c5-4bab-80d2-1c24715277eb

📥 Commits

Reviewing files that changed from the base of the PR and between ffd9333 and 183251e.

📒 Files selected for processing (5)
  • src/api/notification/notification.ts
  • src/hooks/setting/useMyNotificationSettings.ts
  • src/lib/queryKeys.ts
  • src/pages/setting/Setting.tsx
  • src/types/setting/notification.ts

Comment thread src/pages/setting/Setting.tsx Outdated
Comment thread src/pages/setting/Setting.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/setting/Setting.tsx`:
- Around line 92-98: Update the notification settings error flow around
useMyNotificationSettings and isNotificationError to show toast.error when
loading fails, while retaining the existing inline error UI and retry action.
Trigger the toast from a useEffect guarded by an indicator so it fires once per
error rather than repeatedly during rendering.
- Around line 108-109: Update isNotificationSectionLoading in the Setting
component to include the notification query’s refetching or fetching state
alongside isNotificationLoading, while preserving the selectedOrgId guard, so
skeleton content and save-button locking remain active during retries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: adb36f40-d105-4c0b-85e2-7a9127038a60

📥 Commits

Reviewing files that changed from the base of the PR and between 183251e and 7e6faf1.

📒 Files selected for processing (4)
  • src/api/notification/notification.ts
  • src/hooks/setting/useMyNotificationSettings.ts
  • src/lib/queryKeys.ts
  • src/pages/setting/Setting.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/lib/queryKeys.ts
  • src/hooks/setting/useMyNotificationSettings.ts

Comment thread src/pages/setting/Setting.tsx
Comment thread src/pages/setting/Setting.tsx Outdated
@YermIm

YermIm commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

P4: 확인했습니다! 저는 서버 에러로 뜨는데 잘 확인되시나요??

@jjjsun

jjjsun commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator Author

P4: 확인했습니다! 저는 서버 에러로 뜨는데 잘 확인되시나요??

음...저도 지금 서버에러뜹니다..한번 백엔드에 문의해볼게요!!

@jjjsun

jjjsun commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator Author

P4: 확인했습니다! 저는 서버 에러로 뜨는데 잘 확인되시나요??

백엔드에서 500 서버에러 발생했던거라, 백엔드 오류 해결하니 잘 나옵니다!! 바로 merge하겠습니다!

@jjjsun
jjjsun merged commit 2754209 into develop Jul 28, 2026
3 checks passed
@jjjsun
jjjsun deleted the feature/#332 branch July 28, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📬 API 서버 API 통신 ✨ Feature 기능 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ [Feature] 내 알림 설정 GET API 연동

2 participants